package com.tg.data.http.entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Describe:
 * Created by Rance Rang on 2019-12-19.
 * <p>
 * Copyright (c) Tange.Inc All rights reserved.
 */
public class DeviceBellBean implements Parcelable {
    public static final int PERSONAL_FLAG = 1;
    public static final String STANDARD_FILE_FLAG = "_0_";
    public static final String PERSONAL_FILE_FLAG = "_1_";
    private String id;
    private String description;
    private String name;
    private int flag = 0;
    public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return this.name;
    }
    public void setFlag(int flag) {
        this.flag = flag;
    }

    public boolean isPersonal() {
        return flag == PERSONAL_FLAG;
    }

    private List<String> urls;

    public  DeviceBellBean(){

    }

    public DeviceBellBean(String id, String description){
        this.id = id;
        this.description = description;
    }

    public DeviceBellBean(String id, String name, String description){
        this.id = id;
        this.name = name;
        this.description = description;
    }

    protected DeviceBellBean(Parcel in) {
        id = in.readString();
        description = in.readString();
        urls = in.createStringArrayList();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(description);
        dest.writeStringList(urls);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<DeviceBellBean> CREATOR = new Creator<DeviceBellBean>() {
        @Override
        public DeviceBellBean createFromParcel(Parcel in) {
            return new DeviceBellBean(in);
        }

        @Override
        public DeviceBellBean[] newArray(int size) {
            return new DeviceBellBean[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<String> getUrls() {
        return urls;
    }

}
